from openai import AzureOpenAI

client = AzureOpenAI(
  azure_endpoint = 'https://oooppeenai.openai.azure.com/',
  api_key='e2a615a1031f40f5ab6388b7e69a2390',
  api_version="2023-05-15"
)

response = client.chat.completions.create(
  model="gpt35", # Model = should match the deployment name you chose for your 1106-preview model deployment
  messages=[
    {"role": "system", "content": "You are a helpful assistant designed to output JSON."},
    {"role": "user", "content": "Who won the world series in 2020?"}
  ]
)
print(response.choices[0].message.content)